home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4616 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.3 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: One hardware-basher's manifesto
  5. Date: 2 Mar 1996 05:30:29 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4h8mdl$599@maureen.teleport.com>
  8. References: <4ge8na$vhe@ar.ar.com.au> <08000305729070351637@BIRDLAND> <4guenp$1a1@vixen.cso.uiuc.edu> <4h51kg$cio@maureen.teleport.com> <4h59q5$hvl@maureen.teleport.com> <4h5e0h$iae@vixen.cso.uiuc.edu>
  9. NNTP-Posting-Host: linda.teleport.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Saladino Michael D (msaladin@students.uiuc.edu) wrote:
  13. : sschaem@teleport.com (Stephan Schaem) writes:
  14.  
  15. : >:  You do not ALWAYS access ram linearly... Drawing a vertical line in 32bit
  16. : >:  color only accessing ram linearly?
  17.  
  18. : >: ..    move.l    d0,(a0)
  19. : >:     adda.l    a1,a0
  20. : >:     dbra    d0,..
  21.  
  22. : > What I really wanted to show (above is a bad example) is that GFX
  23. : > function can pretty much access ram 'randomly' for writes & READS.
  24.  
  25. : > The 'worse' case senario is free direction texture mapping.
  26.  
  27. : Aren't we thinking one-dimensionally today?  What about the next line
  28. : drawn next to it.  Could be entirely cache hits.  And the one after
  29. : that?  You know modern day caches are many K in size and can hold
  30. : quite a bit.  In case you aren't understanding me, let's say you
  31. : want to fill a square with, oh let's say green.  And just because
  32. : you like a challenge, you fill it vertically.  The first line drawn
  33. : will give you nothing but misses, assuming the cache is initially
  34. : empty.  However, it's that second one... that's the ticket.  It could
  35. : be nothing but cache hits depending on the size and mapping of the
  36. : cache.  And guess what, same goes for the third and forth line.
  37. : Now, this argument doesn't work well for some sad little 256 byte
  38. : cache (020s take a step back).  Hell, even a 4K will only give you
  39. : a benifit for small polygons, but it could be there.  And that's my
  40. : point.  Yes, graphic routines can appear very random at times, but
  41. : given a large enough cache (ever see what modern day processors are
  42. : comin' with), you can use them to your advantage.  So, many of your
  43. : points are valid on little sad chips that were designed years or even
  44. : a decade ago, but on today's stuff, it doesn't hold true.
  45.  
  46.  Well those 'litle sad chips' is what the amiga is using....
  47.  
  48. : And, as for free direction texture mapping being the worse case, it
  49. : ain't.  The problem is caused by the size of the line and how it maps
  50. : into the cache.  You could draw a line that appears quite random, but
  51. : the second line drawn might hit every single pixel due to this same
  52. : randomness and how it mapped into the cache.
  53.  
  54.  And aren't we speaking to little bit to fast today?
  55.  
  56.  I suggest you get an 030 user manual and read about the 030 data cache
  57.  (the organazition should be the same on 040 and 060, but more cache line)
  58.  then you can learn how a cache miss occure.... let me just say that
  59.  bit 4 to 7 on the 030 is the index in the cache table.
  60.  
  61.  If you can run the example of a constantz innerloop and its affect on
  62.  the cache with say a 320x200 screen and 256x256 tmap. Just check the
  63.  a0 and a1 adress and how they cause cache misses because they share
  64.  the same index but not the same tag.
  65.  
  66.  The more you know about the cache the best you can use it. you can
  67.  optmize code to fit better on the 020 cache for example.
  68.  
  69.  anyway,
  70.  
  71.  Stephan
  72.  
  73.